<template>
  <div class="page">
    <input type="text" :value="value" @input="onInput" :type="type" />
  </div>
</template>

<script type="text/ecmascript-6">
export default {
  props: {
    value: {
      type: String,
      default: ""
    },
    type: {
      type: String,
      default: "text"
    }
  },
  data() {
    return {};
  },
  methods: {
    onInput(e) {
      this.$emit("input", e.target.value);
      this.$parent.$emit("validate");
    }
  },
  components: {}
};
</script>

<style scoped>
</style>
